package com.lagou.edu.controller;

import com.lagou.edu.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName EmailController
 * @Description TODO
 * @Auth ying.xiao
 * @Date 2021/4/20
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @GetMapping("/send/{email}/{code}")
    public boolean sendEmail(@PathVariable String email,@PathVariable String code){
            return emailService.sendEmail(email,code);
    }
}
